<%--
  Created by IntelliJ IDEA.
  User: 钱多多的钱罐罐
  Date: 2022/4/13
  Time: 16:16
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%--EL表达式JSTL引入--%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
  <head>
    <title>$Title$</title>
  </head>
  <body>
  <form method="post" action="stu">
    <input type="hidden" name="flag" value="show">
    姓名：<input type="text" name="stuName">
    性别：<input type="text" name="stuSex">
    <input type="submit" value="查询">
  </form>
  <table border="1">
    <tr><th>编号</th><th>姓名</th><th>性别</th><th>创建时间</th></tr>
    <c:forEach items="${stuList}" var="stu" varStatus="status">
      <tr>
        <td>${stu.id}</td>
        <td>${stu.name}</td>
        <td>${stu.sex}</td>
        <td>${stu.creatTime}</td>
      </tr>
    </c:forEach>
  </table>
  <%--当前页数（currentPage）页面容量（pageSize）总条数（totalCountPage）总页数（totalPage）--%>
  <%--分页展示--%>
  <a href="stu?flag=show&currentPage=1">首页</a>
  <a href="stu?flag=show&currentPage=${page.currentPage-1}">上一页</a>
  <a href="stu?flag=show&currentPage=${page.currentPage+1}">下一页</a>
  <a href="stu?flag=show&currentPage=${page.totalPage}">末页</a>
  </body>
</html>
